package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.*;
import cn.wolfcode.trip.base.query.QueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface IUserService {

    User getUserByEmailAndPassword(String email, String password);
    void save(User user);
    User regist(User user);
    User login(String email, String password);
    PageInfo query(QueryObject qo);
    void update(User user);
    User get(Long id);
    MyCredit selectCredits(Long userId);
    void spendCredits(MyCredit myCredit);
    List<Map<String, Object>> selectShoppingCart(Long userId);
    void addProducts(ShoppingCart shoppingCart);
    User getUserByTargetId(Long targetUserId);
    void addPricious(MyPricious myPricious);

    List<User> selectAll();

    void deleteProducts(ShoppingCart shoppingCart);
    void addOrder(Order order);
    List<Map<String, Object>> selectOrder(Long userId);
}
